package com.lp.aop.aspectj;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * ClassName: Main
 * Description:
 * @since 1.0.0
 *
 * 查看AspectJAutoProxyBeanDefinitionParser.java源码
 *
 */
public class Main {
	public static void main(String[] args) {

		//<aop:aspectj-autoproxy /> 标签怎么实现的？
		//源码直接查找：aspectj-autoproxy
		//
		//*******入口******
		//找到对应的解析器:  AspectJAutoProxyBeanDefinitionParser implements BeanDefinitionParser
		//每一个标签，都有一个对应的BeanDefinitionParser

		ApplicationContext applicationContext =
				new ClassPathXmlApplicationContext("spring-aop-test.xml");

		TestInterface test = (TestInterface) applicationContext.getBean("test");
		test.dosomeTest();
		System.out.println("-----");
		test.doOtherTest();
		System.out.println("-----");
		test.a();
		test.b();


	}
}
